<script src="/js/html2canvas.min.js"></script>
<script>
    $(document).ready(function() {
        $("#createImg").click(function() {
            html2canvas(document.body, {
                onrendered: function(canvas) {
                    document.getElementById("canvasImg").src = canvas.toDataURL();
                }
            });
        });

        $("#saveImg").click(function() {
            $.ajax({
                type: "POST",
                url: "/canvas/upload",
                data: {image: $("#canvasImg").attr("src")},
                success: function(msg) {
                    alert("Data Saved: " + msg);
                }
            });
        });
    });
</script>
<section>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <div class="header">
        <h1 class="heading"><a href="#">
                <span>Presto 0.73 Documentation</span></a></h1>
        <h2 class="heading"><span>Presto Documentation</span></h2>
    </div>
    <img id="canvasImg" alt="Right click to save me!">
    <button type="button" class="btn btn-primary" id="createImg">Create</button>
    <button type="button" class="btn btn-danger" id="saveImg">Save</button>
</section>